<%= link_to("Add",:controller => 'checker', :action => :edit, :id => params[:id], :checker_id => nil) %>

<table border="1" cellpadding="5">   
    <tr>
        <th> Name </th>
        <th> File </th>
        <th> Language </th>
        <th> Action </th>
    </tr>

    <% @task.checkers.each do |checker|%>
    
    <% file = nil%>       
    
    <tr align="center">            
        <td> <%= checker.name %>  </td>
        <td> <%= (checker.file) ? checker.file.name : "No File"%>  </td>
        <td> <%= checker.program_language.name %> </td>
        <td>    
             <%= link_to("edit", :controller => 'checker', :action => :edit, :id => @task.id, :checker_id => checker.id) %> /                              
             <%= link_to("delete", {:controller => 'checker', :action => :delete, :id => checker.id}, {:confirm=>"Are you sure?"} ) %>            
        </td>
    </tr>
    
    <% end %>

</table>